#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N=20;
double a[N][N];
double x[N],y[N];
double dp[N][1<<16];
int n;
double get_dist(int i,int j)
{
	double tx=x[i]-x[j];
	double ty=y[i]-y[j];
	return sqrt(tx*tx+ty*ty);
}
int main()
{
	memset(dp,127,sizeof(dp));
	double ret=dp[0][0];
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>x[i]>>y[i];
	for(int i=0;i<=n;i++)
		for(int j=i+1;j<=n;j++)
			a[i][j]=a[j][i]=get_dist(i,j);
//	cout<<get_dist(0,1)<<endl;
	for(int i=1;i<=n;i++)
		dp[i][1<<(i-1)]=a[0][i];
//	cout<<dp[1][1]<<endl;
	for(int i=1;i<1<<n;i++)
	{
		for(int j=1;j<=n;j++)
		{
			if(i&(1<<(j-1))==0)
				continue;
			for(int k=1;k<=n;k++)
			{
				if(j==k || (i&(1<<(k-1)))==0)	
					continue;
			
				dp[j][i]=min(dp[j][i],dp[k][i-(1<<(j-1))]+a[j][k]);
			}
		}
	}

	
	for(int i=1;i<=n;i++)
	{
//		cout<<dp[i][(1<<n)-1]<<endl;
		ret=min(ret,dp[i][(1<<n)-1]);
	}
	
	printf("%.2lf",ret);
	return 0;
}
